/**
 * Created by hcadmin on 16/10/25.
 */
$(function(){

    initLogModelList(group_id,"-1","1");

    //启/停用模板
    $(document).on('click','.model_use_state',function(){
        var dailyrecord_temp_id = $(this).attr("id");
        var status= $(this).attr("status");
        var new_status;
        if(status=="0"){
            new_status = "1";
        }else{
            new_status = "0";
        }


        var url_putData = apiurl+"/dailyrecords/temp/"+dailyrecord_temp_id+"/status?dailyrecord_temp_status="+new_status+"";

        $.ajax({
            beforeSend:function(){
                $(".show_hide").hide();
            },
            type:"PUT",
            url :url_putData,
            success:function(d){
                $(".show_hide").show();
                window.location.reload();
            }
        })
    });

    $(".log_nav_right").on('click',function(){
        window.location.href="createLogModel.html?whichpage=0&num_model="+num_model+"";
    })
});